home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / swingall.jar / javax / swing / AbstractButtonBeanInfo.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-07-15  |  6.8 KB  |  62 lines

  1. package javax.swing;
  2.  
  3. import java.awt.Image;
  4. import java.beans.BeanDescriptor;
  5. import java.beans.PropertyDescriptor;
  6. import java.beans.SimpleBeanInfo;
  7. import javax.swing.beaninfo.SwingBeanInfo;
  8.  
  9. public class AbstractButtonBeanInfo extends SwingBeanInfo {
  10.    private static final Class classAbstractButton;
  11.    // $FF: synthetic field
  12.    static Class class$javax$swing$AbstractButton;
  13.  
  14.    static {
  15.       classAbstractButton = class$javax$swing$AbstractButton != null ? class$javax$swing$AbstractButton : (class$javax$swing$AbstractButton = class$("javax.swing.AbstractButton"));
  16.    }
  17.  
  18.    // $FF: synthetic method
  19.    static Class class$(String var0) {
  20.       try {
  21.          return Class.forName(var0);
  22.       } catch (ClassNotFoundException var2) {
  23.          throw new NoClassDefFoundError(((Throwable)var2).getMessage());
  24.       }
  25.    }
  26.  
  27.    private PropertyDescriptor createPropertyDescriptor(String var1, Object[] var2) {
  28.       return super.createPropertyDescriptor(classAbstractButton, var1, var2);
  29.    }
  30.  
  31.    public BeanDescriptor getBeanDescriptor() {
  32.       return ((SwingBeanInfo)this).createBeanDescriptor(classAbstractButton, new Object[]{"preferred", Boolean.TRUE, "shortDescription", "AbstractButton"});
  33.    }
  34.  
  35.    public Image getIcon(int var1) {
  36.       switch (var1) {
  37.          case 1:
  38.             Image var5 = ((SimpleBeanInfo)this).loadImage("beaninfo/images/AbstractButtonColor16.gif");
  39.             return var5 == null ? ((SimpleBeanInfo)this).loadImage("beaninfo/images/JComponentColor16.gif") : var5;
  40.          case 2:
  41.             Image var4 = ((SimpleBeanInfo)this).loadImage("beaninfo/images/AbstractButtonColor32.gif");
  42.             return var4 == null ? ((SimpleBeanInfo)this).loadImage("beaninfo/images/JComponentColor32.gif") : var4;
  43.          case 3:
  44.             Image var3 = ((SimpleBeanInfo)this).loadImage("beaninfo/images/AbstractButtonMono16.gif");
  45.             return var3 == null ? ((SimpleBeanInfo)this).loadImage("beaninfo/images/JComponentMono16.gif") : var3;
  46.          case 4:
  47.             Image var2 = ((SimpleBeanInfo)this).loadImage("beaninfo/images/AbstractButtonMono32.gif");
  48.             return var2 == null ? ((SimpleBeanInfo)this).loadImage("beaninfo/images/JComponentMono32.gif") : var2;
  49.          default:
  50.             return super.getIcon(var1);
  51.       }
  52.    }
  53.  
  54.    public PropertyDescriptor[] getPropertyDescriptors() {
  55.       Object[] var1 = new Object[]{"LEFT", new Integer(2), "SwingConstants.LEFT", "CENTER", new Integer(0), "SwingConstants.CENTER", "RIGHT", new Integer(4), "SwingConstants.RIGHT", "LEADING", new Integer(10), "SwingConstants.LEADING", "TRAILING", new Integer(11), "SwingConstants.TRAILING"};
  56.       Object[] var2 = new Object[]{"TOP", new Integer(1), "SwingConstants.TOP", "CENTER", new Integer(0), "SwingConstants.CENTER", "BOTTOM", new Integer(3), "SwingConstants.BOTTOM"};
  57.       Object[] var3 = new Object[]{"LEFT", new Integer(2), "SwingConstants.LEFT", "CENTER", new Integer(0), "SwingConstants.CENTER", "RIGHT", new Integer(4), "SwingConstants.RIGHT", "LEADING", new Integer(10), "SwingConstants.LEADING", "TRAILING", new Integer(11), "SwingConstants.TRAILING"};
  58.       Object[] var4 = new Object[]{"TOP", new Integer(1), "SwingConstants.TOP", "CENTER", new Integer(0), "SwingConstants.CENTER", "BOTTOM", new Integer(3), "SwingConstants.BOTTOM"};
  59.       return new PropertyDescriptor[]{this.createPropertyDescriptor("icon", new Object[]{"bound", Boolean.TRUE, "visualUpdate", Boolean.TRUE, "shortDescription", "The button's default icon"}), this.createPropertyDescriptor("horizontalTextPosition", new Object[]{"bound", Boolean.TRUE, "enumerationValues", var1, "visualUpdate", Boolean.TRUE, "shortDescription", "The horizontal position of the text relative to the icon."}), this.createPropertyDescriptor("margin", new Object[]{"bound", Boolean.TRUE, "visualUpdate", Boolean.TRUE, "shortDescription", "The space between the button's border and the label."}), this.createPropertyDescriptor("selectedIcon", new Object[]{"bound", Boolean.TRUE, "visualUpdate", Boolean.TRUE, "shortDescription", "The selected icon for the button."}), this.createPropertyDescriptor("rolloverSelectedIcon", new Object[]{"bound", Boolean.TRUE, "visualUpdate", Boolean.TRUE, "shortDescription", "The rollover selected icon for the button."}), this.createPropertyDescriptor("UI", new Object[]{"shortDescription", "UI"}), this.createPropertyDescriptor("selected", new Object[]{"shortDescription", "selected"}), this.createPropertyDescriptor("contentAreaFilled", new Object[]{"bound", Boolean.TRUE, "visualUpdate", Boolean.TRUE, "shortDescription", "Whether the button should paint the content area or leave it transparent."}), this.createPropertyDescriptor("rolloverIcon", new Object[]{"bound", Boolean.TRUE, "visualUpdate", Boolean.TRUE, "shortDescription", "The rollover icon for the button."}), this.createPropertyDescriptor("selectedObjects", new Object[]{"shortDescription", "selectedObjects"}), this.createPropertyDescriptor("borderPainted", new Object[]{"bound", Boolean.TRUE, "visualUpdate", Boolean.TRUE, "shortDescription", "Whether the border should be painted."}), this.createPropertyDescriptor("disabledIcon", new Object[]{"bound", Boolean.TRUE, "visualUpdate", Boolean.TRUE, "shortDescription", "The disabled icon for the button."}), this.createPropertyDescriptor("verticalTextPosition", new Object[]{"bound", Boolean.TRUE, "enumerationValues", var2, "visualUpdate", Boolean.TRUE, "shortDescription", "The vertical position of the text relative to the icon."}), this.createPropertyDescriptor("pressedIcon", new Object[]{"bound", Boolean.TRUE, "visualUpdate", Boolean.TRUE, "shortDescription", "The pressed icon for the button."}), this.createPropertyDescriptor("rolloverEnabled", new Object[]{"bound", Boolean.TRUE, "visualUpdate", Boolean.TRUE, "shortDescription", "Whether rollover effects should be enabled."}), this.createPropertyDescriptor("text", new Object[]{"bound", Boolean.TRUE, "preferred", Boolean.TRUE, "visualUpdate", Boolean.TRUE, "shortDescription", "The button's text."}), this.createPropertyDescriptor("focusPainted", new Object[]{"bound", Boolean.TRUE, "visualUpdate", Boolean.TRUE, "shortDescription", "Whether focus should be painted"}), this.createPropertyDescriptor("model", new Object[]{"bound", Boolean.TRUE, "shortDescription", "Model that the Button uses."}), this.createPropertyDescriptor("actionCommand", new Object[]{"shortDescription", "actionCommand"}), this.createPropertyDescriptor("disabledSelectedIcon", new Object[]{"shortDescription", "disabledSelectedIcon"}), this.createPropertyDescriptor("label", new Object[]{"bound", Boolean.TRUE, "shortDescription", "Replace by setText(text)"}), this.createPropertyDescriptor("horizontalAlignment", new Object[]{"bound", Boolean.TRUE, "enumerationValues", var3, "visualUpdate", Boolean.TRUE, "shortDescription", "The horizontal alignment of the icon and text."}), this.createPropertyDescriptor("verticalAlignment", new Object[]{"bound", Boolean.TRUE, "enumerationValues", var4, "visualUpdate", Boolean.TRUE, "shortDescription", "The vertical alignment of the icon and text."})};
  60.    }
  61. }
  62.